/**
 * get timestamp, unit: ms
 * @return timestamp
 * 
 */
#include <time.h>
unsigned int wl_ext_get_timestamp(void) {
    struct timespec ts;
    clock_gettime(CLOCK_REALTIME, &ts);
    return (unsigned int)(ts.tv_sec * 1000 + ts.tv_nsec / 1000000);
}

/**
 * get ticks count
 * @return ticks
 */
unsigned int wl_ext_get_elasp_ticks(void) {
    struct timespec ts;
    clock_gettime(CLOCK_MONOTONIC, &ts);
    return (unsigned int)(ts.tv_sec * 1000 + ts.tv_nsec / 1000000);

}
